
package com.jf.cloud.auth.dto;

import com.jf.cloud.common.util.PrincipalUtil;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 用于登陆传递手机号码和验证码
 * @author zz
 * @date 2020/7/1
 */
public class LoginCodeDTO {

    @Schema(description = "手机号" , required = true)
    @Pattern(regexp= PrincipalUtil.MOBILE_REGEXP,message = "请输入正确的手机号")
    @NotBlank(message = "手机号不能为空")
    private String mobile;

    @Schema(description = "验证码" , required = true)
    @NotBlank(message = "验证码不能为空")
    private String validCode;

    /**
     * @see com.jf.cloud.api.auth.constant.SysTypeEnum
     */
    @Schema(description = "系统类型 0.普通用户系统" , required = true)
    @NotNull(message = "sysType不能为空")
    private Integer sysType;

    @Schema(description = "tempUid" , required = true)
    private String tempUid;

    @Schema(description = "社交账号类型 微信小程序或者微信公众号" , required = true)
    private Integer socialType;

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getValidCode() {
        return validCode;
    }

    public void setValidCode(String validCode) {
        this.validCode = validCode;
    }

    public Integer getSysType() {
        return sysType;
    }

    public void setSysType(Integer sysType) {
        this.sysType = sysType;
    }

    public String getTempUid() {
        return tempUid;
    }

    public void setTempUid(String tempUid) {
        this.tempUid = tempUid;
    }

    public Integer getSocialType() {
        return socialType;
    }

    public void setSocialType(Integer socialType) {
        this.socialType = socialType;
    }

    @Override
    public String toString() {
        return "LoginCodeDTO{" +
                "mobile='" + mobile + '\'' +
                ", validCode='" + validCode + '\'' +
                ", sysType=" + sysType +
                ", tempUid='" + tempUid + '\'' +
                ", socialType=" + socialType +
                '}';
    }
}
